home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFinitloopids.z / AFinitloopids
Encoding:
Text File  |  2002-10-03  |  6.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss((((3333ddddmmmm))))                                          aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afInitLoopIDs - initialize a list of loop ID's for a given instrument in
  10.      an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  14.  
  15.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt iiiinnnnsssstttt,,,, iiiinnnntttt llllooooooooppppiiiiddddssss[[[[]]]],,,,
  16.                                       iiiinnnntttt nnnnllllooooooooppppssss))))
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  19.      _s_e_t_u_p   expects an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure, previously created by a call to
  20.              aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(3dm).
  21.  
  22.      _i_n_s_t    is an integer which identifies an instrument configuration to be
  23.              included in a new file when the file is created.
  24.  
  25.              Of the currently supported audio file formats, only AIFF-C (AIFF)
  26.              files contain instrument configurations, with a maximum of one
  27.              per file.  For this reason, the value AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____IIIINNNNSSSSTTTT should
  28.              always be used for this argument for now.
  29.  
  30.      _l_o_o_p_i_d_s is an array of unique positive integer values to be used
  31.              subsequently for configuring individual loops in a file opened
  32.              for write access with _s_e_t_u_p.
  33.  
  34.              Since the instrument parameter chunk in an AIFF-C (AIFF) file
  35.              allocates space for exactly two loops (a release loop and a
  36.              sustain loop), the current version of the audio library will
  37.              ignore any ID's after the first two in the list.
  38.  
  39.      _n_l_o_o_p_s  is an integer which indicates the number of loop ID's in the
  40.              _l_o_o_p_i_d_s array.
  41.  
  42.              For AIFF-C (AIFF) files, _n_l_o_o_p_s is ignored since the number of
  43.              loops in the instrument configuration is always 2.
  44.  
  45. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  46.      aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss(3dm) initializes a list of unique loop ID's corresponding
  47.      to the loops supplied for the specified instrument in an audio file.
  48.  
  49.      AIFF-C (AIFF) files contain storage space for two loops in the instrument
  50.      configuration:  a "sustain" loop and a "release" loop.  You use the loop
  51.      ID's as arguments to the library routines which allow you to set the play
  52.      modes and beginning and end point markers for the loops.
  53.  
  54.      You can disable the loops by setting their loop modes to
  55.      AAAAFFFF____LLLLOOOOOOOOPPPP____MMMMOOOODDDDEEEE____NNNNOOOOLLLLOOOOOOOOPPPP.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss((((3333ddddmmmm))))                                          aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. EXAMPLE
  75.      Configure an AIFF-C file so that it will contain storage space for
  76.      sustain and release loops.
  77.  
  78.      First call aaaaffffIIIInnnniiiittttIIIInnnnssssttttIIIIDDDDssss(3dm) to specify that the file should contain one
  79.      instrument configuration (with ID AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____IIIINNNNSSSSTTTT).
  80.  
  81.      Next call aaaaffffIIIInnnniiiittttLLLLooooooooppppIIIIDDDDssss(((()))) with _n_l_o_o_p_s set to 2 and _l_o_o_p_i_d_s set to {1,2}
  82.      (these values are arbitrary).
  83.  
  84.      Reserve four marker locations (two endpoints for each loop) by calling
  85.      aaaaffffIIIInnnniiiittttMMMMaaaarrrrkkkkIIIIDDDDssss(3dm) with the marker ID list set to {1,2,3,4} (these values
  86.      are arbitrary).
  87.  
  88.      After you create an audio file using the AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure which
  89.      contains the loop ID's, you set the endpoint markers and play modes for
  90.      the loops individually using aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm), aaaaffffSSSSeeeettttLLLLooooooooppppEEEEnnnndddd(3dm), and
  91.      aaaaffffSSSSeeeettttLLLLooooooooppppMMMMooooddddeeee(3dm).
  92.  
  93.      You store the sample frame locations for the endpoints of the loops into
  94.      the markers by calling aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(3dm).
  95.  
  96.      You use the routine aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) to map the loop ID's {1, 2}
  97.      to "sustain" and "release" (in any order).
  98.  
  99. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  100.      The Audio File Library will continue to expand the number of supported
  101.      file formats.  The ability of these file formats to store various kinds
  102.      and numbers of loops will vary.  See aaaaffffGGGGeeeettttLLLLooooooooppppIIIIDDDDssss(3dm) for some important
  103.      notes about handling this situation.
  104.  
  105. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  106.      afNewFileSetup(3dm), afOpenFile(3dm), afInitMarkIDs(3dm),
  107.      afInitInstIDs(3dm), afSetLoopStart(3dm), afSetInstParamLong(3dm),
  108.      afSetMarkPosition(3dm)
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.